package com.itheima.day14.day14work4;

import java.util.concurrent.CountDownLatch;

public class Demo {
    public static void main(String[] args) {

        CountDownLatch cdl=new CountDownLatch(3);
        Mother m=new Mother(cdl);
        Childer1 c1=new Childer1(cdl);
        Childer2 c2=new Childer2(cdl);
        Childer3 c3=new Childer3(cdl);
        Thread t1=new Thread(m);
        Thread t2=new Thread(c1);
        Thread t3=new Thread(c2);
        Thread t4=new Thread(c3);
        t1.start();
        t2.start();
        t3.start();
        t4.start();

    }
}
